<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
      <button>发送请求</button>
</body>
</html>
<script src="./lib/jquery-3.1.0.min.js"></script>
<!-- <script>

let result=null;
function getData(obj){
  console.log("前端===>",obj);
  result=obj
}

</script> -->
<!-- <script src="http://127.0.0.1:4000/users/testajax?callback=getData&id=10087"></script> 
 --><script>
       
      // console.log("result==>>",result)
   
    $("button").click(()=>{
      $.ajax({
        type:"get",
        url:"http://127.0.0.1:4000/users/testajax",
        data:{
          id:"天气"
        },
        jsonpCallback:"getTest",   //定义方法的名字,不使用jquery自动生成的方法名
        dataType:"jsonp",
        success:(data)=>{
         console.log(data)
        }
      })
   }) 

   //jQuery31003005934910098933_1660619944153
   //jQuery31002990196705198884_1660620010466
</script>

